For details see: http://stackoverflow.com/questions/11160363/execute-shell-script-after-post-build-in-jenkinsOn a Linux server, when the build is complete, you need to manipulate the content, the files, and if you can use shell commands to execute it, it is very convenient.However,
How to write post-receive on Windows when git users push files to git server. Check the commit message and call the Jenkins build API to compile the project if it contains Run_build.Environment settings:1. Installing Jenkins---Popular code management toolsSelect the remote trigger scripts in the
Build a continuous integration environment based on Jenkins and build integration with jenkins
After reading the blog post of Zhang Shanyou from yuanyou, the attempt is successful. The original website:Http://www.cnblogs.com/shanyou/p/3750714.html
What is the difficulty in
additional plugins.
Install the following two plugins as described above in installing the plugin:
Post Build Task
Postbuildscript
Both plug-ins are used to execute shell scripts, unlike the post build task plug-in, which can perform different actions depending on the build
the script file startup. shchmod + x startup. sh // startup the script. sh grants the executable permission vi startup. sh // Edit
Add the following code to the startup. sh file:
#!/bin/bashwww_path=/home/pec/wwwjar_name=demo-test-0.0.1-SNAPSHOT.jarpid=$(cat /home/pec/www/demo-test.pid)if ${pid}; then echo "pid is null"else kill -9 ${pid}ficd ${www_path}java -jar ${jar_name} echo $! > /home/p
solution using MSBuild", if you don't see this option, This means that the MSBuild plugin is not installed correctly.After clicking "Build a Visual Studio project or solution using MSBuild", enter the name of the build script in the "MSBuild Build File" input box: Helloci.msbuild. We want
Jenkins experience to talk about 1 (step by step to build a Jenkins environment)In the company has been using Jenkins software for some time, took a lot of detours, but also accumulated some experience, can share with you.
Let's build a
continuous integration packaging platform, I used the following several plugins.
GIT Plugin
SSH Credentials Plugin
Git Changelog Plugin: Get the Commit log submitted by the repository
Build-name-setter: Used to modify build name
Description Setter Plugin: Used to modify build description information, add display QRCode in Description inf
project, and the new version here is also the option to create a MAVEN project. you didn't, because you didn't install the Maven plugin, so install the Maven plugin so you can build a Maven project or, System management--plug-in management--optional plugins this time, you should be able to see the list of optional plugins, because before the operation, we have correctly modified the URL of the site in the filter, enter MAVEN to find MAVEN integra
all know, the industrial revolution liberated the human hands, so that people avoid a lot of repetitive work, and Jenkins can help develop Test OPS to solve a lot of repetitive work, we can write some repetitive work, such as: Code submission, Execution Unit test, program compilation, Build, The release, etc., is packaged as a script that is executed periodicall
You may not have figured out what Jenkins can do.This section uses Jenkins to complete the build, test, and deployment of the Python program, giving you an intuitive understanding of what Jenkins can do.The contents of this section are rewritten from https://jenkins.io/doc/tutorials/
that comes with Jenkins (need to install, refer to the installation method of the Git plugin above), or you can write your own script to complete. When scripting, you can write directly using Xcode's xcodebuild, or you can use the Xctool provided by Facebook. However, in this example, I use the makefile to complete the compilation package. This makefile features: Specify provisioning Profile Package compil
Because the last post was too popular, many people asked more people how Jenkins in two different regions can automatically trigger jobs. the products made by many companies are only part of the global work. We need to do this part well and continue to do it later. This bottom-up incremental integration method is adopted by more and more large companies. Naturally, this can also be fully automated.
This ar
the month, the value 1~12;The last parameter represents the week week, and the value 0~7,0 and 7 are all represented in Sunday.So 0 * * * * represents the first 0 minutes of each hour to perform a build.Figure 11. Choose how to trigger the buildThe next step is to add the build. Jenkins offers four options for us to choose from, and to execute or invoke external commands and scripts as needed.Figure 12. Fo
also write your own shell script configuration here based on the actual project.Figure 13. Configure Execute Windows Batch commandSelect and configure other options, such as email reminders, and then click Save.Figure 14. Configure Email RemindersThe Jenkinstest Job will be built in the next 0 minutes of every hour. We can observe the progress and final state of the build in
Jenkins.war
Directly in the Tomcat container can be more convenient (recommended, the reasons are: simple, follow Tomcat launch release, reduce unnecessary expenses, pit less, I have both installed, directly installed a lot of pits) deployment Jenkins
Follow the prompts to enter the ciphertext, the interface is as follows:
Then you will fill out the user information, install the basic plug-ins, prompts to do good.
Click on the System-managed global t
directory (where the directory name can be self-determined, the red part is key):1: Put all the files into the/data/jenkins directory of the Linux root directory and mount the/data directory on a separate hard drive2: All environment variable configurations need to be put into the/DATA/JENKINS/.BASHRC script, the. BASHRC scr
folder!"Exit1 Else Echo "Find ${war_dir} exist war package ${war_name}" # Echo "deleteing old Package ${war_name} in ${war_dir}" # RM${war_dir}/${war_name}Echo "deleteing old Package ${war_name} in ${deploy_loaction}" RM${deploy_loaction}${war_name}Echo "start Transfer ${war_name} to ${deploy_loaction}" CP${war_dir}/${war_name} ${deploy_loaction}Sleep 3 fiEcho "--------------Transfer War package to Tomcat WebApps End-------------------"#reboot TomcatEcho ">>>>>>> rebooting to
permissions are as follows (you can view Help on the configuration page by placing the mouse over that permission):
Overall (global)
Credentials (voucher)
Slave (node)
Job (Task)
View (views)
administer
Read
runscripts
uploadplugins
configureupdatecenter
Create
Update
View
Delete
managedomains
Configure
Delete
Create
Disconnect
Connect
Firefox) input localhost:8080,localhost can be the IP of the machine, It can also be a computer name. You can open Jenkins. The second method is to use Tomcat to open the extract tomcat to a directory, such as/usr/local, into the ToMCAT under the/bin directory, start Tomcat.put the Jenkins.war file in the WebApps directory under Tomcat, and when you start Jenkins, it automaticallyThe WebApps directory is s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.